var autocomplete;
var email_exist = false;

function initialize() {
    autocomplete = new google.maps.places.Autocomplete(document.getElementById('location'));
}

function check_email_exist(field) {
    return email_exist && (email_exist == field.val()) ? "* Email already registered" : false;
}

function check_name(field) {
    return (/^[a-z0-9 ']{1,32}$/i).test(field.val()) ? false : "* Name can contain only letters, numbers and quotes";
}

$(document).ready(function(){
    $("form").validationEngine();
    initialize();
});
